package org.freedom.fastdevpt.core.base;

import java.util.List;
import java.util.Map;

import org.freedom.fastdevpt.core.ex.DelException;
import org.freedom.fastdevpt.core.ex.SaveException;
import org.freedom.fastdevpt.core.ex.UpdateException;

public interface BaseBz<K, T, Q> {
	T getByPk(K pk);

	void save(T t) throws SaveException;

	void batchSave(final List<T> list)throws SaveException;

	boolean update(T t)throws UpdateException;

	boolean batchdelete(K[] pk)throws DelException;

	boolean delete(K pk)throws DelException;

	List<T> getByQuery(Q q);

	List<Map<String, Object>> getForList(Q q);

	Long getCountByQuery(Q q);
}
